home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _SQLite_Escape.au3 < prev    next >
Text File  |  2007-09-08  |  442b  |  14 lines

  1. #include <SQLite.au3>
  2. #include <SQLite.dll.au3>
  3.  
  4. _SQLite_Startup()
  5. Local $sTestString,$i,$aRow
  6. For $i = 1 To 255
  7.     $sTestString &= Chr($i)
  8. Next
  9. _SQLite_Open()
  10. _SQLite_Exec(-1,"CREATE TABLE test (a)")
  11. _SQLite_Exec(-1,"INSERT INTO test VALUES (" & _SQLite_Escape($sTestString) & ")")
  12. _SQLite_QuerySingleRow(-1,"SELECT a FROM test LIMIT 1",$aRow)
  13. If $aRow[0] = $sTestString Then ConsoleWrite("! identical !" & @LF)
  14. _SQLite_Shutdown()